Adaptive parameter continuation for square nonlinear systems. The default homotopy connects the initial guess x0 to the target system F(x)=0. Its Jacobian uses vecfcn_helper, which selects an analytic Jacobian, AD, or finite differences for the target system. A custom homotopy must satisfy H(x0,0)=0 and H(x,1)=F(x).
Fixed-parameter continuation is the default. Pseudo-arclength mode augments the corrector and can follow regular folds in the path. Extend this type and override homotopy and homotopy_jacobian to change the path without replacing the continuation algorithm.
Gets the convergence on function value tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(in) | :: | this |
The equation_solver object. |
The tolerance value.
Gets the convergence on slope of the gradient vector tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(in) | :: | this |
The equation_solver object. |
The tolerance value.
Get the initial and maximum continuation step.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(continuation_solver), | intent(in) | :: | this |
Solver whose step size is queried. |
Current initial/maximum lambda increment.
Get the maximum Newton corrections allowed per continuation step.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(continuation_solver), | intent(in) | :: | this |
Solver whose corrector limit is queried. |
Current corrector iteration limit.
Gets the maximum number of function evaluations allowed during a single solve.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(in) | :: | this |
The equation_solver object. |
The maximum number of function evaluations.
Get the minimum continuation step before failure is reported.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(continuation_solver), | intent(in) | :: | this |
Solver whose minimum step is queried. |
Current minimum lambda increment.
Gets a logical value determining if iteration status should be printed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(in) | :: | this |
The equation_solver object. |
True if the iteration status should be printed; else, false.
Query whether pseudo-arclength continuation is enabled.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(continuation_solver), | intent(in) | :: | this |
Gets the convergence on change in variable tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(in) | :: | this |
The equation_solver object. |
The tolerance value.
Evaluate . Extend continuation_solver and override this binding to change the path while reusing the continuation and corrector logic. Keep and , and override homotopy_jacobian with its derivative with respect to .
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(continuation_solver), | intent(inout) | :: | this |
The continuation solver instance. |
||
| class(vecfcn_helper), | intent(inout) | :: | fcn |
Helper containing the target system F. |
||
| real(kind=real64), | intent(in), | dimension(:) | :: | x |
Point at which the homotopy is evaluated. |
|
| real(kind=real64), | intent(in), | dimension(:) | :: | x0 |
Initial point that anchors the default path. |
|
| real(kind=real64), | intent(in) | :: | lambda |
Continuation parameter in [0,1]. |
||
| real(kind=real64), | intent(out), | dimension(:) | :: | h |
Homotopy residual. |
|
| class(*), | intent(in), | optional | :: | args |
User arguments forwarded to F. |
Evaluate . vecfcn_helper selects an analytic Jacobian, AD, or finite differences for . A custom homotopy override should also override this binding accordingly.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(continuation_solver), | intent(inout) | :: | this |
The continuation solver instance. |
||
| class(vecfcn_helper), | intent(inout) | :: | fcn |
Helper containing the target system and its Jacobian behavior. |
||
| real(kind=real64), | intent(inout), | dimension(:) | :: | x |
Point at which the Jacobian is evaluated; unchanged on return. |
|
| real(kind=real64), | intent(in), | dimension(:) | :: | x0 |
Initial point that anchors the default path. |
|
| real(kind=real64), | intent(in) | :: | lambda |
Continuation parameter in [0,1]. |
||
| real(kind=real64), | intent(out), | dimension(:,:) | :: | jac |
Jacobian of the homotopy with respect to x. |
|
| class(*), | intent(in), | optional | :: | args |
User arguments forwarded to F. |
Evaluate the default path derivative H_lambda=F(x)-(x-x0). Override this binding along with homotopy and homotopy_jacobian when defining a custom homotopy.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(continuation_solver), | intent(inout) | :: | this | |||
| class(vecfcn_helper), | intent(inout) | :: | fcn | |||
| real(kind=real64), | intent(in), | dimension(:) | :: | x | ||
| real(kind=real64), | intent(in), | dimension(:) | :: | x0 | ||
| real(kind=real64), | intent(in) | :: | lambda | |||
| real(kind=real64), | intent(out), | dimension(:) | :: | deriv | ||
| class(*), | intent(in), | optional | :: | args |
Sets the convergence on function value tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(inout) | :: | this |
The equation_solver object. |
||
| real(kind=real64), | intent(in) | :: | x |
The tolerance value. |
Sets the convergence on slope of the gradient vector tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(inout) | :: | this |
The equation_solver object. |
||
| real(kind=real64), | intent(in) | :: | x |
The tolerance value. |
Set the initial and maximum continuation step, clamped to (0,1].
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(continuation_solver), | intent(inout) | :: | this |
Solver whose step size is changed. |
||
| real(kind=real64), | intent(in) | :: | step |
Requested lambda increment. Values outside (0,1] are clamped. |
Set the maximum Newton corrections allowed per continuation step.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(continuation_solver), | intent(inout) | :: | this |
Solver whose corrector limit is changed. |
||
| integer, | intent(in) | :: | n |
Requested limit. Values below one are clamped to one. |
Sets the maximum number of function evaluations allowed during a single solve.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(inout) | :: | this |
The equation_solver object. |
||
| integer, | intent(in) | :: | n |
The maximum number of function evaluations. |
Set the smallest continuation step that the solver will attempt.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(continuation_solver), | intent(inout) | :: | this |
Solver whose minimum step is changed. |
||
| real(kind=real64), | intent(in) | :: | step |
Requested minimum lambda increment, clamped to [epsilon,1]. |
Sets a logical value determining if iteration status should be printed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(inout) | :: | this |
The equation_solver object. |
||
| logical, | intent(in) | :: | x |
True if the iteration status should be printed; else, false. |
Select pseudo-arclength continuation instead of fixed-lambda steps.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(continuation_solver), | intent(inout) | :: | this | |||
| logical, | intent(in) | :: | use_pseudo |
Sets the convergence on change in variable tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(inout) | :: | this |
The equation_solver object. |
||
| real(kind=real64), | intent(in) | :: | x |
The tolerance value. |
Dispatch to the selected continuation strategy.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(continuation_solver), | intent(inout) | :: | this | |||
| class(vecfcn_helper), | intent(inout) | :: | fcn | |||
| real(kind=real64), | intent(inout), | dimension(:) | :: | x | ||
| real(kind=real64), | intent(out), | dimension(:) | :: | fvec | ||
| type(iteration_behavior), | intent(out), | optional | :: | ib | ||
| class(*), | intent(in), | optional | :: | args |